package com.zxx.pattern.chainPattern.chain;

/**
 * @author zxx on 2021/1/25
 */
public class ConcreteHandler2 extends Handler {

    @Override
    public void handleMessage(int type) {
        if (type == 2 || type == 4) {
            System.out.println("ConcreteHandler2解决这个问题");
        } else {
            System.out.println("ConcreteHandler2解决不了问题");
            if (nextHandler != null) {
                nextHandler.handleMessage(type);
            } else {
                System.out.println("没人解决2");
            }
        }
    }
}
